<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; 
if(!$_GET['t']){
	header("Location: ".$_SERVER['url']."?t=".time());
	exit('page error');
}
?>
<?php $this->need('header.php'); ?>


    <div class="mdui-card mdui-shadow-2 mdui-ripple">
        <div class="mdui-card-primary">
            <div class="mdui-card-primary-title "><?php $this->archiveTitle(array(
                    'category' => _t('分类 %s 下的文章'),
                    'search' => _t('包含关键字 %s 的文章'),
                    'tag' => _t('标签 %s 下的文章'),
                    'author' => _t('%s 发布的文章')
                ), '', ''); ?></div>
        </div>
    </div>

    <?php if ($this->have()): ?>
    <div id="left">
        <div id="content-body">
            <?php while ($this->next()): ?>

                <div class="mdui-card content-body mdui-shadow-5 mdui-ripple">
                    <div class="mdui-card-primary ">
                        <div class="mdui-card-primary-title "><?php $this->title() ?></div>
                        <div class="mdui-card-primary-subtitle ">作者：<?php $this->author(); ?>&nbsp;&nbsp;&nbsp;&nbsp;
                            分类：<?php $this->category(',', true, 'none'); ?>
                            &nbsp;&nbsp;&nbsp;&nbsp;标签：<?php $this->tags(',', true, 'none'); ?></br>
                            时间：<?php $this->date('Y-m-d H:i'); ?>
                        </div>
                    </div>

                    <div class="mdui-card-content "><?php $this->excerpt(100, ' ...'); ?></div>

                    <div style="text-align: right ">
                        <a class="mdui-btn mdui-ripple mdui-text-color-theme"
                           href="<?php $this->permalink(); ?>#comment-1"><?php $this->commentsNum(); ?>条评论</a>
                        <a class="mdui-btn mdui-ripple mdui-text-color-theme"
                           href="javascript:void(0);" onclick="onRead('<?php $this->permalink() ?>')">阅读全文</a>
                    </div>
                </div>

            <?php endwhile; ?>
        </div>

        <?php else: ?>
            <article class="post">
                <h2 class="post-title"><?php _e('没有找到内容'); ?></h2>
            </article>
        <?php endif; ?>

        <div id="more_content" style="text-align: center; margin-bottom: 30px;">
            <?php $this->pageLink('下一页', 'next'); ?>
            <button class="mdui-color-theme mdui-btn mdui-ripple" href="javascript:void(0);" id="load_content"
                    style="display: none;">加载更多
            </button>
        </div>
    </div>
<script src="<?php $this->options->themeUrl('inc/js/archive.js'); ?>"></script>
<?php //$this->need('footer.php'); ?>
